import { createSlice } from "@reduxjs/toolkit";

const counterSlice = createSlice({
  name: 'counter',
  initialState: {
    count: 10
  },
  reducers: {
    updateCountAction (state, { payload }) {
      state.count += payload
    }
  }
})

export const { updateCountAction } = counterSlice.actions
export default counterSlice.reducer